package com.ymttest.database.mapping.livetv;

import com.ymttest.database.model.livetv.LiveProductDot;
import com.ymttest.database.model.livetv.LiveProductDotExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface LiveProductDotMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @SelectProvider(type=LiveProductDotSqlProvider.class, method="countByExample")
    int countByExample(LiveProductDotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @DeleteProvider(type=LiveProductDotSqlProvider.class, method="deleteByExample")
    int deleteByExample(LiveProductDotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @Delete({
        "delete from liveproductdot",
        "where LiveProductDotId = #{liveProductDotId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer liveProductDotId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @Insert({
        "insert into liveproductdot (LiveProductDotId, LiveId, ",
        "ProductId, DotResource, ",
        "CreateTime, UpdateTime)",
        "values (#{liveProductDotId,jdbcType=INTEGER}, #{liveId,jdbcType=INTEGER}, ",
        "#{productId,jdbcType=VARCHAR}, #{dotResource,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(LiveProductDot record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @InsertProvider(type=LiveProductDotSqlProvider.class, method="insertSelective")
    int insertSelective(LiveProductDot record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @SelectProvider(type=LiveProductDotSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="LiveProductDotId", property="liveProductDotId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="LiveId", property="liveId", jdbcType=JdbcType.INTEGER),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="DotResource", property="dotResource", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<LiveProductDot> selectByExample(LiveProductDotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @Select({
        "select",
        "LiveProductDotId, LiveId, ProductId, DotResource, CreateTime, UpdateTime",
        "from liveproductdot",
        "where LiveProductDotId = #{liveProductDotId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="LiveProductDotId", property="liveProductDotId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="LiveId", property="liveId", jdbcType=JdbcType.INTEGER),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="DotResource", property="dotResource", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    LiveProductDot selectByPrimaryKey(Integer liveProductDotId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @UpdateProvider(type=LiveProductDotSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") LiveProductDot record, @Param("example") LiveProductDotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @UpdateProvider(type=LiveProductDotSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") LiveProductDot record, @Param("example") LiveProductDotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @UpdateProvider(type=LiveProductDotSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LiveProductDot record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table liveproductdot
     *
     * @mbggenerated Tue Oct 20 18:21:33 CST 2020
     */
    @Update({
        "update liveproductdot",
        "set LiveId = #{liveId,jdbcType=INTEGER},",
          "ProductId = #{productId,jdbcType=VARCHAR},",
          "DotResource = #{dotResource,jdbcType=INTEGER},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where LiveProductDotId = #{liveProductDotId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(LiveProductDot record);
}